
 

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 

 


<title>how to extract search engine results</title>
 
    <link rel="stylesheet" href="/css/default_developer.css" />

<script type="text/javascript" language="JavaScript" src="/js/popUp.js"></script>
<script language="javascript1.2" type="text/javascript" src="/js/sniff.js"></script>
<script language="javascript1.2" type="text/javascript" src="/js/menucontent.js"></script>
<script language="javascript1.2" type="text/javascript" src="/js/menucode.js"></script>
<script language="JavaScript"><!-- var s_pageName="home page" //--></script>
 

<!--
<link rel="stylesheet" type="text/css" href="style.jsp">
-->
 


 

</head>
<!--stopindex-->
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bgcolor="#ffffff" onload="prepmenus(); done=true">
<a name="top"></a>


<script language="JavaScript" src="/s_code_remote.js"></script>
 
<!-- Custom Header Code-->

    
    
<!-- BEGIN MASTHEAD -->
<!-- BEGIN A1 COMPONENT V.0 -->

<div class="a1">
<div class="a1v0">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="bottom">
<td nowrap="nowrap">
<a href="#skip2content"><img src="/im/a.gif" alt="Skip to Content" width="1" height="1" border="0"></a>
<span class="toolbarlinks">
<a href="http://developers.sun.com/global/mh/java/">Java</a>
<a href="http://developers.sun.com/global/mh/solaris/" class="dividelink">Solaris</a>
<a href="http://developers.sun.com/global/mh/communities/">Communities</a>
<a href="http://developers.sun.com/global/mh/store/" class="lastlink">Sun Store</a>
</span>
</td><td align="right" nowrap="nowrap">
<span class="toolbarlinks">
<a href="http://developers.sun.com/global/join_sdn.html"><b>Join SDN</b></a>
<a href="http://developers.sun.com/global/my_profile.html">My Profile</a>
<a href="http://developers.sun.com/global/why_join.html" class="lastlink">Why Join?</a>
</span>
</td></tr>
</table>
</div>
</div>

<!-- END A1 COMPONENT V.0 -->

<!-- BEGIN VNV1 COMPONENT V0  -->
<script type='text/JavaScript' src='http://developers.sun.com/js/showHide.js'></script>
<div class="vnv1" id="vnv1v0">
<div class="cornerTL"><div class="cornerTR"><div class="cornerBL"><div class="cornerBR">

<div class="vnv1search">
	<table border="0" cellpadding="0" cellspacing="0" class="topnavlight">
	<form action="http://developers.sun.com/search/onesearch/index.jsp" accept-charset="utf-8" method="GET">

	<input type="hidden" name="charset" value="utf-8">
	<input type="hidden" name="col" value="dev-reference">

	<tr>
	<td nowrap="nowrap"><span class="rightarrowwhite">&raquo;</span>&nbsp;<a href="http://developers.sun.com/global/search_tips.html">search tips</a>&nbsp;</td>
	<td><input class="searchfield" name="qt" class="medium" size="7" onFocus="if( this.value==this.defaultValue ) this.value='';" value="Search"></td>
	<td valign="middle" align="left"><input type="image" border="0" src="/im/vnv1_bttn_search.gif" alt="Submit Search"></td>

	</tr></form>

	</table>
</div>

<div class="vnv1topiclinks">

<table cellpadding="1" cellspacing="0" border="0">
<tr>
<td rowspan="2"><a href="http://java.sun.com" title="java.sun.com"><img src="/im/a.gif" alt="Home Page" width="96" height="58" border="0" class="sunlogo"></a></td>
<td colspan="12"><a href="http://developers.sun.com" title="developers.sun.com"><img src="/im/a.gif" alt="" width="250" height="32" border="0"></a></td>
</tr>
<tr valign="bottom">
<td><img src="/im/a.gif" alt="" width="1" height="1" border="0" id="ip1"></td>
<td class="navlinks" id="navlink1" onMouseOver="javascript:popfly(1);" onMouseOut="javascript:closefly();"><div onMouseOver="javascript:popfly(1);" onMouseOut="javascript:closefly();"><a id="glink1" onclick="if(window.s_account&&this.getAttribute('title')){s_linkType='o';s_linkName='Masthead Menu: '+this.getAttribute('title');s_prop15=s_pageName;s_prop16=this.getAttribute('title');s_lnk=s_co(this);s_gs(s_account);}" href="http://developers.sun.com/global/mh/api/index.html" title="See All APIs">APIs</a></div></td>
<td><img src="/im/a.gif" alt="" width="1" height="1" border="0" id="ip2"></td>
<td class="navlinks" id="navlink2" onMouseOver="javascript:popfly(2);" onMouseOut="javascript:closefly();"><div onMouseOver="javascript:popfly(2);" onMouseOut="javascript:closefly();"><a id="glink2" onclick="if(window.s_account&&this.getAttribute('title')){s_linkType='o';s_linkName='Masthead Menu: '+this.getAttribute('title');s_prop15=s_pageName;s_prop16=this.getAttribute('title');s_lnk=s_co(this);s_gs(s_account);}" href="http://developers.sun.com/global/mh/downloads/index.html" title="See All Downloads">Downloads</a></div></td>
<td><img src="/im/a.gif" alt="" width="1" height="1" border="0" id="ip3"></td>
<td class="navlinks" id="navlink3" onMouseOver="javascript:popfly(3);" onMouseOut="javascript:closefly();"><div onMouseOver="javascript:popfly(3);" onMouseOut="javascript:closefly();"><a id="glink3" onclick="if(window.s_account&&this.getAttribute('title')){s_linkType='o';s_linkName='Masthead Menu: '+this.getAttribute('title');s_prop15=s_pageName;s_prop16=this.getAttribute('title');s_lnk=s_co(this);s_gs(s_account);}" href="http://developers.sun.com/global/mh/tech/index.html" title="See All Technologies">Technologies</a></div></td>
<td><img src="/im/a.gif" alt="" width="1" height="1" border="0" id="ip4"></td>
<td class="navlinks" id="navlink4" onMouseOver="javascript:popfly(4);" onMouseOut="javascript:closefly();"><div onMouseOver="javascript:popfly(4);" onMouseOut="javascript:closefly();"><a id="glink4" onclick="if(window.s_account&&this.getAttribute('title')){s_linkType='o';s_linkName='Masthead Menu: '+this.getAttribute('title');s_prop15=s_pageName;s_prop16=this.getAttribute('title');s_lnk=s_co(this);s_gs(s_account);}" href="http://developers.sun.com/global/mh/products/index.html" title="See All Products">Products</a></div></td>
<td><img src="/im/a.gif" alt="" width="1" height="1" border="0" id="ip5"></td>
<td class="navlinks" id="navlink5" onMouseOver="javascript:popfly(5);" onMouseOut="javascript:closefly();"><div onMouseOver="javascript:popfly(5);" onMouseOut="javascript:closefly();"><a id="glink5" onclick="if(window.s_account&&this.getAttribute('title')){s_linkType='o';s_linkName='Masthead Menu: '+this.getAttribute('title');s_prop15=s_pageName;s_prop16=this.getAttribute('title');s_lnk=s_co(this);s_gs(s_account);}" href="http://developers.sun.com/global/mh/support/index.html" title="See All Support">Support</a></div></td>
<td><img src="/im/a.gif" alt="" width="1" height="1" border="0" id="ip6"></td>
<td class="navlinks" id="navlink6" onMouseOver="javascript:popfly(6);" onMouseOut="javascript:closefly();"><div onMouseOver="javascript:popfly(6);" onMouseOut="javascript:closefly();"><a id="glink6" onclick="if(window.s_account&&this.getAttribute('title')){s_linkType='o';s_linkName='Masthead Menu: '+this.getAttribute('title');s_prop15=s_pageName;s_prop16=this.getAttribute('title');s_lnk=s_co(this);s_gs(s_account);}" href="http://developers.sun.com/global/mh/suncom/index.html" title="See All Sun.com">Sun.com</a></div></td>
</tr>
</table>
</div>

</div></div></div></div>
</div>

<script type="text/javascript"> printmenus(); </script>

<!-- END VNV1 COMPONENT V0  -->
<!-- END MASTHEAD -->



    <p>

<!-- Custom Nav Code -->

    
    





<!-- BEGIN VNV2 BREADCRUMB COMPONENT  -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="vatop">
    <tr>
    <td width="99%">
        <div class="breadcrumb">
            

            <nobr><a href="http://developers.sun.com/">Developers Home</a> &gt;</nobr>
            <nobr><a href="http://forum.java.sun.com/index.jspa">Developer Forums</a> &gt;</nobr>

            
            <!--<nobr><a href="index.jspa">Java Technology Forums</a> &gt;</nobr> -->

            

            

            
            <nobr><a href="category.jspa?categoryID=5">Java Essentials</a> &gt;</nobr>
            
            

            
            <nobr><a href="forum.jspa?forumID=31&start=0">Java Programming</a> &gt;</nobr>
            
            

            
            
            
        </div>
    </td>
    <td><div class="breadcrumb"></div></td>
    <td align="right" nowrap="nowrap"><div class="breadcrumb">
    </div></td>
    <tr>
        <td colspan="2"><img src="im/a.gif" width="100%" height="1" border="0" alt=" " /></td>
    </tr>
</table>

    <!-- END VNV2 BREADCRUMB COMPONENT  -->


    <!-- BEGIN VNV3 PAGETITLE, two-level variation -->
    
    <div class="pagetitle2">Developer Forums</div>
    <div class="pagetitle">how to extract search engine results</div>
    
    <!-- END VNV3 PAGETITLE, two-level variation -->

    <!-- BEGIN AD PORTION -->
    
    <!-- END AD PORTION -->

    <table border="0" cellspacing="0" cellpadding="6">
    <tr>
        <td width="170" valign="top">

        

        <table border="0" cellpadding="0" cellspacing="0" width="170">
            <tr>
                
                <td class="headerbar3"><div class="headerpadding2"><span style="color:#fff;">Java Forums</span></div></td>
                
            </tr>
        </table>

        <table border="0" cellpadding="0" cellspacing="0" width="170" class="navblue2">
        <tr><td><div class="colpadding3">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="vatop">

            

            <tr>
                <td colspan="2"><strong>Welcome</strong><br/><br/>
                </td>
            </tr>
            <tr>
            <td><span class="rightarrowblue">&raquo;</span>&nbsp;&nbsp;</td>
            
            <td width="100%"><a href="login!withRedirect.jspa?referrer=http%3A%2F%2Fforum.java.sun.com%2Fthread.jspa%3FthreadID%3D591515%26start%3D0%26tstart%3D0">Login</a></td></tr>
            
            </tr>
        <tr>
            <td><span class="rightarrowblue">&raquo;</span>&nbsp;&nbsp;</td>
            <td width="100%"><a href="editwatches!default.jspa">Watch List</a></td>
        </tr>

        
        <tr>
            <td><span class="rightarrowblue">&raquo;</span>&nbsp;&nbsp;</td>
	    <td width="100%"><a href="http://developers.sun.com/forums/dukestars.jsp">Duke Stars Program</a></td>
        </tr>
        <tr>
            <td><span class="rightarrowblue">&raquo;</span>&nbsp;&nbsp;</td>
            <td width="100%"><a href="http://developers.sun.com/contact/feedback.jsp?referer=http://forum.java.sun.com&category=sdn&mailsubject=Forums%20or%20Community"> Feedback </a></td>
        </tr>

        

            <tr>
                <td colspan="2">&nbsp;</td>
            </tr>

            
	
		    		
        </table>
    </td>
</tr>
        </table>

        <span class="sp10">&nbsp;</span><br />
        <!-- END VNV14 LOGIN/NAV -->

        <!-- BEGIN VTI3 EMBEDDED SEARCH, variation 2, left column version -->
	<table border="0" cellpadding="0" cellspacing="0" width="170">
            <tr><td class="headerbar3"><div class="headerpadding2"><span style="color:#fff;">
            Search Forums</div></td></tr>
	</table>

	<table border="0" cellpadding="0" cellspacing="0" width="170" class="navblue2">
            <tr><td><div class="colpadding3">
                <form method="get" name="form1" action="http://onesearch.sun.com/search/onesearch/index.jsp">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="vatop">
                    <tr>
                        <td><input type="text" name="qt" id="fm6text1" class="medium"size="8" /></td>
                        <td><input type="submit" border="0" class="buttonblue" value="&nbsp;&raquo;&nbsp;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';" /></td>
                    </tr>
                </table>
                
                
                <script>
                    var subCat = eval("'siteforumid:java31'");
                    document.write("<input type='hidden' name='subCat' value='"+subCat+"'>");
                    document.write("<input type='hidden' name='site' value='dev'>");
                    document.write("<input type='hidden' name='dftab' value='"+subCat+"'>");
                    var chooseCat = "javaall";
                    document.write("<input type='hidden' name='chooseCat' value='"+chooseCat+"'>");
                    document.write("<input type='hidden' name='col' value='developer-forums'>");
                </script>
            </td>
            </tr>
	</table>
	</form>


	


<!-- BEGIN LATEST DISCUSIONS -->

    <!-- END LATEST DISCUSIONS -->


    <!-- BEGIN POPULAR FORUMS -->
    

    <!-- END POPOLAR FORUMS -->

    <!-- BEGIN RELATED LINKS -->
    
    <!-- END RELATED LINKS -->

    <!-- BEGIN Popular Discussions -->
    
    
    <!-- END Popular Discussions -->

    <!-- BEGIN STATIC LINKS -->
    

    <!-- END STATIC LINKS -->


	    

    <span class="sp5">&nbsp;</span><br />
    <span class="sp10">&nbsp;</span><br />
    <!-- END VTI3 EMBEDDED SEARCH, variation 2, left column version -->
    <!-- END LEFT COLUMN COMPONENTS -->

</td>

    <td><img src="im/a.gif" width="10" height="1" border="0" alt=" " /></td>
    <td width="100%" valign="top">
    <!-- BEGIN MAIN CONTENT -->


 
<!-- BEGIN CENTER COLUMN COMPONENTS -->

                                                                                
<!--startindex-->
<a name="skip2content"></a>
<div id="sun-body">
<!-- BEGIN MAIN CONTENT -->

<table border="0" cellpadding="4" cellspacing="0" width="100%" class="vtop">
<tr>
<td>
<a href="forum.jspa?forumID=31">Back to Forum</a>
&nbsp; <a href="http://developers.sun.com/contact/feedback.jsp?referer=http://forum.java.sun.com?forumID=31&category=sdn&mailsubject=Forums%20or%20Community">Feedback About Forums</a>
</td>

<td align="right">
 <!--  BEGIN VTI2 PAGINATION COMPONENT, variation 2 without number links -->

            

    <!--  END VTI2 PAGINATION COMPONENT, variation 2 without number links -->

</td>

</tr>
</table>

<!-- BEGIN G15 GENERIC CONTENT TABLE -->
<table border="0" cellpadding="4" cellspacing="0" width="100%" class="vtop" bgcolor="#507C9A"><tr><td>
<table border="0" cellpadding="2" cellspacing="0" width="100%" class="vtop">

<tr bgcolor="#507C9A">

<!-- BEGIN DUKE DOLLARS -->
<td colspan="2">
<table width="100%" border="0">
<tr>
<td><div class="pad5x10"><span style="color:#fff;">
        



</span></div>
</td>
<td align="right"><div class="pad5x10"><span style="color:#fff;">
 
                This topic has
                18
                replies
                on
                2
                pages.

            

            

                &nbsp;&nbsp;

                

                
                    

                        <a href="thread.jspa?threadID=591515&start=0&tstart=0"
                         class="jive-current"
                         ><font color="#ffffff">1</font></a>
                        |

                     

                
                    

                        <a href="thread.jspa?threadID=591515&start=15&tstart=0"
                         class=""
                         ><font color="#ffffff">2</font></a>
                        |

                     

                

                

                    
                    <a href="thread.jspa?threadID=591515&start=15&tstart=0"
                     ><font color="#ffffff">Next &raquo;</font></a>

                


            
</span></div></td>
</tr>
</table>
</td>
</tr>


<tr bgcolor="#507C9A">
<td colspan="2" align="right"><div class="pad5x10"><span style="color:#fff;">
   	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4" vspace="1" alt=" "><a href="emailfriend!default.jspa?threadID=591515"><font color="#ffffff">E-mail this Topic</font></a> &nbsp;
	<img src="images/ic_report_abuse.gif" width="9" height="9" hspace="4" border="0" alt=" "><a href="abuse!default.jspa?threadID=591515"><font color="#ffffff">Report Abuse</font></a>
	&nbsp;

	<img src="im/ic_eye.gif" hspace="4" border="0" alt=" " />

      <a href="watches!add.jspa?forumID=31&threadID=591515"><font color="#ffffff">Watch this topic</font></a>
      &nbsp;

</span></div></td>

</tr>




    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/bronze-star.gif" title="Dukes Earned 0" />


	<a href="profile.jspa?userID=474358"">suman</a>
	


<br/>

Posts:15
 <br />
Registered: 10/7/04

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:02 AM

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084709" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084709">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Hi,<br><br>I am writing a java application which extracts the results of search engines,( its search engines-not one search engine) on a particular query.I know how to connect to respective search engines and get the html data.<br><br>But,What is the efficient way to extract the links from the results pages.How to parse the html code.I have to extract results from atleast 5 search engines.<br><br>To say exactly, I want to list the urls listed in green color, for example in google.<br><br>Guys , please help me.<br><br>Your help is highly appreciated.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/platinum-star.gif" title="Dukes Earned 1119" />


	<a href="profile.jspa?userID=241279"">CeciNEstPasUnProgrammeur</a>
	


<br/>

Posts:26,052
 <br />
Registered: 23/07/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:11 AM

	(reply 1 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084723" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084723">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Either access their web service API or simply send an request and parse the reply.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:16 AM

	(reply 2 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084729" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084729">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Thats easy. How many links from each engine do you want, do you want to allow duplicate results (i.e. google and yahoo both reporting the same URL in a listing)?<br><br>Do your own search on Google, Yahoo, etc. Look at the HTML code (typically a table) and look for unique tags or IDs that surround the URL. Google and Yahoo incorporate Click-Streaming into their search result URLs. That is, they don't provide the direct URL, but rather reference it within their own redirector which is simply a CGI program designed to count page hits and by what keyword and then simply redirect your browser to the actual page.<br><br>If you can find out what that redirecting URL is, just filter the HTML that you get from these search engines for that URL and then you know where the URL starts and stops.<br><br>Doing some further research will show you how to extract the actual URL from the redirecting URL. Just look at the URL and remove the www.google.com or yahoo.com from the begining and strip out all of the CGI that comes after it until you get to another URL.<br><br>Example: <a href="http://search.google.com/redirector?this-is-google=true&#38;url=www.some-server-that-you-want.com">http://search.google.com/redirector?this-is-google=true&#38;url=www.some-server-that-you-want.com</a><br><br>First off, we now know where within the HTML a link starts, and doing a little more filtering, we can throw out the "search.google.com" and the first CGI of "this-is-google&#38;url=" and then simply read and file the "www.some-server-you-want.com"<br><br>Simple.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/platinum-star.gif" title="Dukes Earned 1119" />


	<a href="profile.jspa?userID=241279"">CeciNEstPasUnProgrammeur</a>
	


<br/>

Posts:26,052
 <br />
Registered: 23/07/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:17 AM

	(reply 3 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084731" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084731">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
&gt; Either access their web service API or simply send an<br>&gt; request and parse the reply.<br><br>Eh, sorry. I meant, use their web service API (several search engines provide one, like Google) <i>instead</i> of simply sending a request and parsing the reply.<br><br>If you still have to do the latter, look for &lt;a&gt; tags, skipping those that belong to the page's "static" links.<br><br>The HTML should look thus:<br><br>-- blah --<br>-- blah --<br>-- result --<br>-- result --<br>.<br>.<br>.<br>-- result --<br>-- blah --<br><br>Find out how to recognize "result" part and discard the rest by looking at the HTML source.<br><br>Think about it: how would you do it when I give you the HTM code printed on a sheet of paper?
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:26 AM

	(reply 4 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084751" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084751">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
[nobr]Here's the code from a Google.com search (I searched for "Java"), below is the 2nd result - and first actual web-page, the first result listed by google is for Google News search on Java, but that has a different ID:<br><br><pre>&lt;p class=g&gt;&lt;a href=http:<font color="darkgreen">//java.sun.com/ onmousedown="return clk(this,'res',1)"&gt;</font>
</pre><br><br>The start of every search-result URL is a paragragh tag (<P>) with a CSS class name of "g".<br><br>Look for and filter "<p class=g>"<br><br>Then filter out the anchor reference (&lt;A&gt;) and just grab everything between the (=) and until you get a blank space. If you get "onmousedown=" in the URL then you've read too much.[/nobr]
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:42 AM

	(reply 5 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084763" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084763">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
[nobr]<pre>
String resultText = <font color="red">"get this by reading from the socket"</font>;
String url = <font color="red">""</font>;
&nbsp;
<font color="navy"><b>if</b></font> (resultText.indexOf(<font color="red">"&lt;p class=g&gt;"</font>) != -1) <font color="navy">{</font>
    url = resultText.substring(resultText.indexOf(<font color="red">"a href="</font>, resultText.indexOf(<font color="red">"&lt;p class=g"</font>))+7, resultText.indexOf(<font color="red">"onmousedown"</font>));
&nbsp;
    fileOutput.println(url);
<font color="navy">}</font>
&nbsp;
</pre><br><br>The code above should be put into a for-while loop that reads the resulting HTML from a search engine. It finds the URLs in the text and then saves it into a file.  URL per line.>[/nobr]
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:44 AM

	(reply 6 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084769" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084769">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
By applying my code to my pulled Google search result should give you the following URL:<br><pre>http:<font color="darkgreen">//java.sun.com/</font>
</pre>
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:46 AM

	(reply 7 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084773" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084773">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
That URL would contain the blank space between the URL and the "onmousedown" so you need to either <pre>url = url.trim();
</pre> or subtract 1 from the indexOf ending location of our substring command.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:48 AM

	(reply 8 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084775" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084775">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
[nobr]The complete (blank space omitting) code should look like below:<br><pre>String resultText = <font color="red">"get this by reading from the socket"</font>;
String url = <font color="red">""</font>;
 
<font color="navy"><b>if</b></font> (resultText.indexOf(<font color="red">"&lt;p class=g&gt;"</font>) != -1) <font color="navy">{</font>
    url = resultText.substring(resultText.indexOf(<font color="red">"a href="</font>, resultText.indexOf(<font color="red">"&lt;p class=g"</font>))+7, resultText.indexOf(<font color="red">"onmousedown"</font>) -1);
 
    fileOutput.println(url);
<font color="navy">}</font>
</pre>>[/nobr]
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:51 AM

	(reply 9 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084783" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084783">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
In the complete code, the last charactor in our URL string would the the slash at the end of the actual URL. This is a good URL according to the RFC standards. In automated systems this would be required, because that extra space would corrupt the correct syntax in an HTTP Request header (being that the defined syntax is a single white space between the last charactor of the URL and the protocol version statement of "HTTP/1.1")
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 2:52 AM

	(reply 10 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3084785" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3084785">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
In your web browser, such as IE or Netscape or Mozilla or Opera or whatever does this triming for you in case you make a mistake.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/bronze-star.gif" title="Dukes Earned 0" />


	<a href="profile.jspa?userID=474358"">suman</a>
	


<br/>

Posts:15
 <br />
Registered: 10/7/04

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 12:00 PM

	(reply 11 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3085445" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3085445">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Thanks for ur reply.<br><br>I will try it and findout whether it works or not.<br><br>Once again,thank you very much.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/bronze-star.gif" title="Dukes Earned 0" />


	<a href="profile.jspa?userID=474358"">suman</a>
	


<br/>

Posts:15
 <br />
Registered: 10/7/04

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Jan 30, 2005 9:45 PM

	(reply 12 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3086185" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3086185">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Hi Watertownjordan,

I have tried your code.

import java.net.*;
import java.io.*;

class GoogleDemo {
    
    public static void main(String[] args) throws Exception {
        new GoogleDemo().go();
    }
    
    void go() throws Exception {
        URL url = new URL("http://www.google.com/search?hl=en&#38;q=java");
        URLConnection conn = url.openConnection();
        conn.setRequestProperty("User-Agent","");
        conn.connect();                           
        BufferedReader in = 
            new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        String resultText="";
        String urlResult="";
        while ((line = in.readLine()) != null) {
            resultText=resultText+line;//System.out.println(line);
		}
  if (resultText.indexOf("<p class=g>") != -1) {
                urlResult = resultText.substring(resultText.indexOf("a href=", resultText.indexOf("<p class=g"))+7, resultText.indexOf("onmousedown") -1);
			}
		System.out.println(urlResult);

        
    }
}

But it is giving me an exception


Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -5753
        at java.lang.String.substring(Unknown Source)
        at GoogleDemo.go(GoogleDemo.java:25)
        at GoogleDemo.main(GoogleDemo.java:7)

I tried to figure it out,but i was unable to do it.

Can you please help me.>
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/silver-star.gif" title="Dukes Earned 174" />


	<a href="profile.jspa?userID=206451"">watertownjordan</a>
	


<br/>

Posts:1,720
 <br />
Registered: 2/2/02

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Feb 1, 2005 12:41 AM

	(reply 13 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3092188" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3092188">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Do you get any results at all before the exception is reached or do you get nothing at all?

What this is trying to say is that a part of the text that we are searching for does not exist.

First off, don't use your method of resultText = resultText + line. You're just using up memory like you wouldn't believe. Trying looping the line.substring() method and apply it as you do a readLine();

Read one line of the output, see if it contains the <p class=g> tag, if it does then filter the &lt;a href="" onmousedown&gt; tag. You should then grab the text between the quote marks, if any, or the text (URL) between the equals sign and the first space after the equals sign. If the text does not contain a <p class=g> tag, then skip that line because it won't have a result url in it. Also, if one does have that tag, but does not have an anchor tag after it, then skip that one too because it too would not have a result url in it.

The exception is caused because it cannot find the tag we are looking for within the text. It could be either the -p- tag, the -a- tag, or it could be the url text we are trying to get at.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>


    <div class="jive-message-list">

    










<tr bgcolor="#E4ECF0">
<td><div class="pad5x10">


		<img src="images/bronze-star.gif" title="Dukes Earned 0" />


	<a href="profile.jspa?userID=474358"">suman</a>
	


<br/>

Posts:15
 <br />
Registered: 10/7/04

</div></td>

<!-- END Author Name or Guest -->


<td><div class="pad5x10"><b>
Re: how to extract search engine results
&nbsp;&nbsp;
    
<br />
Feb 1, 2005 12:18 PM

	(reply 14 of 18)

</b>
<br/>


</div></td>
<!-- END Subject -->

<td><div class="pad5x10">

	<a href="emailmessage!default.jspa?messageID=3095876" title="Click to email this message" />
	<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4"
vspace="1" alt="Click to email this message"/></a>
	
	
	<br><br>
        <form action="post!reply.jspa">
	<input type="hidden" name="messageID" value="3095876">
	<input type="submit" class="buttonblue" value="Reply &raquo;" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';"></form>

 </div></td>
<!-- END REPLY Button -->

</tr>
<!-- END Heading Row -->

<!-- Begin message row -->
<tr class="white">

<td><div class="pad5x10">&nbsp;</div></td>
<td><div class="pad5x10">
Hi watertownjordan ,<br><br>It worked.Thank You.<br><br>I have investigated another way mean while,using java.util.regex; package.However, I am unable to avoid the use of strings.Can u give any sample code,which makes efficient use of memory.<br><br>Thank you so much.<br><br>suman tedla.
</div></td>
<td><div class="pad5x10">&nbsp;</div></td>
</tr>



    </div>



</table>
</td></tr></table>
<span class="sp10">&#160;</span><br />
<img src="im/ic_email.gif" width="14" height="12" border="0" hspace="4" vspace="1" alt="Click to email this message"/> Email this Topic
<br>
<br>
<img src="images/edit-16x16.gif" width="16" height="16" border="0" /> Edit this Topic
<!-- END G15 GENERIC CONTENT TABLE -->
</div>
<!--stopindex-->
 
<!-- Custom Footer Code -->

    
    

    </td>
</tr>
<tr><td valign="bottom"><a href="http://www.jivesoftware.com/poweredby/" target="_new"><img src="im/ic_jive_forums.gif" alt="Powered by Jive Forums" width="74"
height="24" border="0"></a></td>
</tr>
</table>

 
    
    <!-- END RIGHT COLUMN COMPONENTS -->
<br /><img src="/im/a.gif" width="170" height="1" border="0" alt=" " /></td></tr>
<tr><td rowspan="2" valign="bottom"><img src="/im/a.gif" width="170" height="1" border="0" alt=" " /><br />
<!--  BEGIN CELL FOR OPTIONAL MASTHEAD CAPTION -->
<!--  END CELL FOR OPTIONAL MASTHEAD CAPTION --></td></tr>
<!-- END SPACER ROW -->
</table>
<!-- END WRAPPER TABLE, 3 COLUMN, LEFT/MAIN/RIGHT -->
    <!-- BEGIN VNV5 FOOTER  -->
<table border="0" cellpadding="0" cellspacing="10" width="100%">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="vatop">
<tr>
<td colspan="4" valign="top" class="grey3"><img src="/im/a.gif" width="1" height="2" border="0" alt="" /></td></tr>
<tr>
<td><img src="/im/a.gif" width="190" height="1" border="0" alt="" /><br />
<a href="http://www.sun.com"><img src="/im/logo_sun_small_sdn.gif" width="61" height="29" border="0" alt="" vspace="5"/></a></td>
<td width="100%" valign="top"><img src="/im/a.gif" width="350" height="1" border="0" alt="" /><br />
<div class="footer">
<a href="http://developers.sun.com/global/aboutsun.html">About Sun</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/aboutsdn.html">About This Site</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/newsletters.html">Newsletters</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/contact.html">Contact Us</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/employment.html">Employment</a><br />
<a href="http://developers.sun.com/global/howtobuy.html">How to Buy</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/licensing.html">Licensing</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/termsofuse.html">Terms of Use</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/privacy.html">Privacy</a> &nbsp;|&nbsp;
<a href="http://developers.sun.com/global/trademarks.html">Trademarks</a>
<br /><span class="sp10">&nbsp;</span><br />
<br /><span class="sp10">&nbsp;</span><br />
Copyright 1994-2006 Sun Microsystems, Inc.
</div></td>
<td><img src="/im/a.gif" width="40" height="1" border="0" alt="" /></td>
<td valign="top"><div class="footer"><b><a href="http://developers.sun.com/global/aboutsdn.html">A Sun Developer Network Site</a></b></div>
<div class="footer">
<img src="/im/a.gif" width="170" height="1" border="0" alt="" /><br />
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this <a href="http://developers.sun.com/global/berkeley_license.html">License</a>.
<br /><span class="sp5">&nbsp;</span><br />
<a href="http://developers.sun.com/global/rss_sdn.html"><img src="/im/button_xml.gif" width="36" height="14" align="top" border="0" alt="XML" /></a>&nbsp;<a href="http://developers.sun.com/global/content_feeds.html">Content Feeds</a>
</div></td></tr>
<tr><td colspan="4" valign="top" class="grey3"><img src="/im/a.gif" width="1" height="2" border="0" alt="" /></td></tr>
</table>
</td></tr>
</table>
<!-- END VNV5 FOOTER -->

    </body></html>


